package com.py.comment.config;

import com.py.comment.interceptor.CommentInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author pengy
 * @create 2022-11-17 10:52
 */
@Configuration
public class WbeMvcConfig implements WebMvcConfigurer {
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new CommentInterceptor()).addPathPatterns("/**");
    }
}
